﻿@model AppsGenerator.Models.Application

<h2>Application Management</h2>
<hr />
<div class="container">

    <div role="tabpanel">

        <!-- Nav tabs -->
        <ul class="nav nav-tabs" role="tablist">
            <li role="presentation" class="active">
                <a href="#information" aria-controls="information" role="tab" data-toggle="tab">Information</a>
            </li>
            <li role="presentation">
                <a href="#appTables" aria-controls="appTables" role="tab" data-toggle="tab">Application Tables</a>
            </li>
        </ul>
        <div class="tab-content">
            <div role="tabpanel" class="tab-pane active" id="information">
                <div class="form-horizontal">
                    <div class="form-group">
                        @Html.LabelFor(model => model.Name, htmlAttributes: new { @class = "control-label col-md-2" })
                        <div class="col-md-10">
                            @Html.EditorFor(model => model.Name, new { htmlAttributes = new { @class = "form-control" } })
                        </div>
                    </div>

                    <div class="form-group">
                        @Html.LabelFor(model => model.db_datasource, htmlAttributes: new { @class = "control-label col-md-2" })
                        <div class="col-md-10">
                            @Html.EditorFor(model => model.db_datasource, new { htmlAttributes = new { @class = "form-control" } })
                        </div>
                    </div>

                    <div class="form-group">
                        @Html.LabelFor(model => model.db_name, htmlAttributes: new { @class = "control-label col-md-2" })
                        <div class="col-md-10">
                            @Html.EditorFor(model => model.db_name, new { htmlAttributes = new { @class = "form-control" } })
                        </div>
                    </div>

                    <div class="form-group">
                        @Html.LabelFor(model => model.db_user_id, htmlAttributes: new { @class = "control-label col-md-2" })
                        <div class="col-md-10">
                            @Html.EditorFor(model => model.db_user_id, new { htmlAttributes = new { @class = "form-control" } })
                        </div>
                    </div>

                </div>
            </div>
            <div role="tabpanel" class="tab-pane" id="appTables">
                @Html.Action("GetApplicationTables", "Application")
            </div>
        </div>
   </div>
</div>